package com.hu.fallback;

import com.hu.domain.User;
import com.hu.feignclients.UserFeignClient;
import org.springframework.stereotype.Component;

//托底类：一定要去实现 Feign接口
@Component
public class UserFeignClientFallback implements UserFeignClient {

    //拖地方法
    @Override
    public User getUserById(Long id) {
        return new User(-1L,"无此用户","用户服务不可用");
    }
}
